//
//  BGTenderTableViewCell.m
//  bigMall
//
//  Created by LTOVE on 16/7/19.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGTenderTableViewCell.h"
#import "BGTenderCellModel.h"

static NSString *const resueIdentifire = @"cell";
static UITableView *_tableView = nil;

@interface BGTenderTableViewCell ()
/**
 *  是否可拼单状态图
 */
@property (weak, nonatomic) IBOutlet UIImageView *statueImg;

@property (weak, nonatomic) IBOutlet UILabel *leiBie;
/**
 *  单价
 */
@property (weak, nonatomic) IBOutlet UILabel *danJia;
/**
 *  数量
 */
@property (weak, nonatomic) IBOutlet UILabel *num;
/**
 *  交割地
 */
@property (weak, nonatomic) IBOutlet UILabel *address;
/**
 *  保证金
 */
@property (weak, nonatomic) IBOutlet UILabel *baoZhengJin;
/**
 *  截止日期
 */
@property (weak, nonatomic) IBOutlet UILabel *outOfDate;
/**
 *  描述信息
 */
@property (weak, nonatomic) IBOutlet UILabel *goodInfo;
/**
 *  购买人数
 */
@property (weak, nonatomic) IBOutlet UILabel *numOfPeople;
/**
 *  我要购买按钮
 *
 *  @param sender sender description
 */
- (IBAction)bjBtn:(id)sender;

@end

@implementation BGTenderTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
//    self.selectionStyle = UITableViewCellSelectionStyleNone;
    // Configure the view for the selected state
}


+ (instancetype)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath
{
    if (!_tableView) {
        _tableView = tableView;
        [tableView registerNib:[UINib nibWithNibName:@"BGTenderTableViewCell" bundle:nil] forCellReuseIdentifier:resueIdentifire];
    }
    return [tableView dequeueReusableCellWithIdentifier:resueIdentifire forIndexPath:indexPath];
}



- (void)setCellDataModel:(BGTenderCellModel *)cellDataModel
{
    _cellDataModel = cellDataModel;
#warning 图片
    self.leiBie.text = cellDataModel.leiBie;
    self.danJia.text = cellDataModel.danJia;
    self.num.text = cellDataModel.num;
    self.address.text = cellDataModel.address;
    self.baoZhengJin.text = cellDataModel.baoZhengJin;
    self.outOfDate.text = cellDataModel.outOfDate;
    self.goodInfo.text = cellDataModel.goodInfo;
    self.numOfPeople.text = cellDataModel.numOfPeople;
    
}


/**
 *  点击我要投标按钮
 *
 *  @param sender sender description
 */
- (IBAction)bjBtn:(id)sender {
}
@end
